﻿using System;
using System.Web.Mvc;

namespace Fuse8.ContentManagementFramework.Web.ApplicationRuntime
{
    public class DynamicDevController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        protected override void HandleUnknownAction(string actionName)
        {
            var action = Request.IsAjaxRequest() ?
                PartialView(actionName) as ActionResult :
                View(actionName);

            action.ExecuteResult(ControllerContext);
        }
    }
}
